<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page session="true"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/css/jquery.mobile-1.4.2.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/css/app.css?v=0.2.11">
<script
	src="${pageContext.request.contextPath}/resources/js/jquery-1.11.0.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.mobile-1.4.2.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.validate.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.validate.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/additional-methods.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/views/form_usuario.js"></script>
<script>
	$.mobile.ignoreContentEnabled = false
</script>
<script
	src="${pageContext.request.contextPath}/resources/js/validations.js?v=0.2.11"></script>
<style>
.error {
	font-family: calibri;
	font-size: 18px;
	color: red;
}
</style>
<title>Ingreso de Usuarios</title>
</head>
<body>
	<div data-role="page" data-ajax="false" data-theme="a">
		<div data-role="header">
			<h1>Actualizar datos Usuario</h1>
			<a data-iconpos="notext" data-icon="home"
				href="${pageContext.request.contextPath}"></a>
		</div>
		<div role="main" class="ui.content">
			<div class="centered-content">
				<form:form action="actualizar_datos_usuario" method="POST" id="f">
					<form:input type="hidden" path="usuario.id"></form:input>
					<form:input type="hidden" path="id"></form:input>
					<table class="outputTable">
						<tr>
							<td>Rut :</td>
							<td><form:input path="rut" id="rut"
									onblur="doSearch('${pageContext.request.contextPath}/search_persona',this)" /></td>
						</tr>
						<tr>
							<td>Nombre(*) :</td>
							<td><form:input path="nombre" /></td>
						</tr>
						<tr>
							<td><form:label path="direccion">Dirección (*):</form:label></td>
							<td><form:input path="direccion" /></td>
						</tr>
						<tr>
							<td>Comuna(*) :</td>
							<td><form:select path="comuna.id" items="${listaComunas}"
									itemValue="id" itemLabel="nombre" id="comuna">
								</form:select></td>
						</tr>
						<tr>
							<td><form:label path="ciudad">Ciudad(*) :</form:label></td>
							<td><form:input path="ciudad" /></td>
						</tr>
						<tr>
							<td><form:label path="fonoCasa">Fono Casa :</form:label></td>
							<td><form:input path="fonoCasa" /></td>
						</tr>
						<tr>
							<td><form:label path="fonoMovil">Fono Movil(*) :</form:label></td>
							<td><form:input path="fonoMovil" /></td>
						</tr>

						<tr>
							<td><form:label path="correo">Correo Electrónico(*) : </form:label></td>
							<td><form:input path="correo" /></td>
						</tr>

						<tr>
							<td>Nombre de usuario(*) :</td>
							<td><form:input type="text" path="usuario.nombre" /></td>
						</tr>
						<tr>
							<td><form:label path="usuario.password">Password(*) :</form:label></td>
							<td><form:input path="usuario.password" type="password"
									id="p1" /></td>
						</tr>
						<tr>
							<td><form:label path="usuario.password">Repetir Password(*) :</form:label></td>
							<td><input name="password2" type="password" /></td>
						</tr>
						<%-- <tr>
							<td>Rol del usuario(*) :</td>
							<td><form:select path="usuario.rol.id" items="${listaRol}"
									itemValue="id" itemLabel="nombre" id="rol">
								</form:select></td>
						</tr>  --%>
						<tr>
							<td><a href="${pageContext.request.contextPath}"
								class="ui-btn ui-btn-b ui-icon-delete ui-btn-icon-right">Cancelar
							</a></td>
							<td><button type="submit"
									class="ui-btn ui-icon-check ui-btn-icon-right">Registrar</button></td>
						</tr>
					</table>
				</form:form>
			</div>
		</div>
	</div>

</body>
</html>


